﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;



class MagicWords
    {
        static void Main(string[] args)
        {
            int n = int.Parse(Console.ReadLine());
            List<string> words = new List<string>();

            for (int i = 0; i < n; i++)
            {
                words.Add(Console.ReadLine());
            }
            
            string[] result = Reorder(words, n);
            Print(result);
        }

        static string[] Reorder(List<string> words, int n)
        {
            int moveToPosition = 0;
            
            for (int i = 0; i < words.Count; i++)
            {
                moveToPosition = words[i].Length % (n + 1);
                words.Insert(moveToPosition, words[i]);
                if (moveToPosition < i)
                {
                    words.RemoveAt(i + 1);
                }
                else
                {
                    words.RemoveAt(i);
                }
                
            }
            return words.ToArray();
        }

    static void Print(string[] words)
        {

            int maxLength = 0;
            for (int i = 0; i < words.Length; i++)
            {
                if (words[i].Length > maxLength)
                {
                    maxLength = words[i].Length;
                }
            }
            
            StringBuilder result = new StringBuilder();
            for (int i = 0; i < maxLength; i++)
            {
                foreach (string word in words)
                {
                    if (i < word.Length)
                    {
                        result.Append(word[i]);
                    }
                }
            }
        Console.WriteLine(result);
        }

}

